import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWxaUpdatableMessageController } from '../../../controllers';
const uctoowxaUpdatableMessageRouter = new Router();
const wxaUpdatableMessageController = new uctooWxaUpdatableMessageController();

uctoowxaUpdatableMessageRouter.post('/add', requireUser, wxaUpdatableMessageController.add);
uctoowxaUpdatableMessageRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wxa_updatable_message'), wxaUpdatableMessageController.edit);
uctoowxaUpdatableMessageRouter.post('/del', requireUser, rowLevelPermission('uctoo/wxa_updatable_message'), wxaUpdatableMessageController.delete);

//For getting wxaUpdatableMessage with permission control
uctoowxaUpdatableMessageRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wxa_updatable_message'), wxaUpdatableMessageController.getSingle);
uctoowxaUpdatableMessageRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wxa_updatable_message'), wxaUpdatableMessageController.getMany);
uctoowxaUpdatableMessageRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wxa_updatable_message'), wxaUpdatableMessageController.getMany);

//#endregion AutoCreateCode
export default uctoowxaUpdatableMessageRouter;
